package com.example.mall.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.math.BigDecimal;
import java.util.Date;

import java.io.Serializable;

/**
 * <p>
 * 包邮规则表
 * </p>
 *
 * @author whale
 * @since 2025-05-16
 */
@TableName("tb_free_shipping_rules")
public class FreeShippingRules extends Model<FreeShippingRules> {

    private static final long serialVersionUID = 1L;

    /**
     * 规则唯一标识
     */
    @TableId("rule_id")
    private Long ruleId;
    /**
     * 目的地（城市、省份等）
     */
    private String destination;
    /**
     * 最小订单金额（满足此金额包邮）
     */
    @TableField("min_amount")
    private BigDecimal minAmount;
    /**
     * 最小重量（单位：千克，满足此重量包邮）
     */
    @TableField("min_weight")
    private BigDecimal minWeight;
    /**
     * 是否启用（0：禁用，1：启用）
     */
    @TableField("is_active")
    private Integer isActive;
    /**
     * 创建时间
     */
    @TableField("create_date")
    private Date createDate;
    /**
     * 更新时间
     */
    @TableField("update_date")
    private Date updateDate;


    public Long getRuleId() {
        return ruleId;
    }

    public void setRuleId(Long ruleId) {
        this.ruleId = ruleId;
    }

    public String getDestination() {
        return destination;
    }

    public void setDestination(String destination) {
        this.destination = destination;
    }

    public BigDecimal getMinAmount() {
        return minAmount;
    }

    public void setMinAmount(BigDecimal minAmount) {
        this.minAmount = minAmount;
    }

    public BigDecimal getMinWeight() {
        return minWeight;
    }

    public void setMinWeight(BigDecimal minWeight) {
        this.minWeight = minWeight;
    }

    public Integer getIsActive() {
        return isActive;
    }

    public void setIsActive(Integer isActive) {
        this.isActive = isActive;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }



    @Override
    public String toString() {
        return "FreeShippingRules{" +
        ", ruleId=" + ruleId +
        ", destination=" + destination +
        ", minAmount=" + minAmount +
        ", minWeight=" + minWeight +
        ", isActive=" + isActive +
        ", createDate=" + createDate +
        ", updateDate=" + updateDate +
        "}";
    }
}
